package com.leetcode.LC;

public class LC709 {
    public String toLowerCase(String str) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < str.length(); i++) {
            builder.append(toLower(str.charAt(i)));
        }
        return builder.toString();

    }

    public char toLower(char c) {
        if (c <= 'Z' && c >= 'A') {
            return (char) ('a' + (c - 'A'));
        } else {
            return c;
        }
    }

    public static void main(String[] args) {
        System.out.println(new LC709().toLowerCase("He,llo"));
    }
}
